<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="https://cdn.bootcss.com/twitter-bootstrap/3.4.1/css/bootstrap.min.css">
    <style>
        .account{
            width:400px;
            margin: 0 auto;
        }
    </style>

</head>
<body>
<div class="account">
    <form>
    {% for field in form %}
        {% if field.name == 'code' %}
            <div class="form-group">
                <label for="exampleInputEmail1">{{ field.label }}</label>
                <div class="clearfix">
                    <div class="col-md-6" style="padding-left: 0">{{ field }}</div>
                    <div class="col-md-6"><input type="button" class="btn btn-default" value="获取验证码"></div>
                </div>
    {#    <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">#}
    {#    <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>#}
            </div>
        {% else %}
            <div class="form-group">
                <label for="exampleInputEmail1">{{ field.label }}</label>
                {{ field }}
            {#    <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">#}
            {#    <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>#}
            </div>
        {% endif %}
    {% endfor %}
      <button type="submit" class="btn btn-primary" >提 交</button>
    </form>
</div>
</body>
</html>